package com.csnf.service;

import com.csnf.dao.SinggerDao2;
import com.csnf.entity.Singger;
import com.csnf.util.MybatisUtil;

import java.util.List;

public class SinggerService2 {
    SinggerDao2 singgerDao;

    public List<Singger> getSingger(String singerName,String sex,String piaoshu1,String piaoshu2,String x,String y){
        singgerDao= MybatisUtil.init().getMapper(SinggerDao2.class);
        List<Singger> list=singgerDao.getSingger(singerName,sex,piaoshu1,piaoshu2,x,y);
        MybatisUtil.close();
        return list;

    }
    public int updateToupiao(String sid){
        singgerDao= MybatisUtil.init().getMapper(SinggerDao2.class);
        int i=singgerDao.updateToupiao(sid);
        MybatisUtil.close();
        return i;
    }

    public int getSingerCount(){
        singgerDao= MybatisUtil.init().getMapper(SinggerDao2.class);
        int i=singgerDao.getSingerCount();
        MybatisUtil.close();
        return i;
    }
}
